@dpuse/dpuse-development 0.3.520 → 0.3.521
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6697,7 +6697,7 @@ async function oi() {
|
|
|
6697
6697
|
//#endregion
|
|
6698
6698
|
//#region src/operations/documentDependencies.ts
|
|
6699
6699
|
var si = "<!-- DEPENDENCY_LICENSES_START -->", ci = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
6700
|
-
async function li(e = ""
|
|
6700
|
+
async function li(e = "MIT") {
|
|
6701
6701
|
try {
|
|
6702
6702
|
Ar("Document Dependencies"), await Sr("licenses/downloads"), await wr("1️⃣ Identify production licenses", "license-checker-rseidelsohn", [
|
|
6703
6703
|
"--production",
|
|
@@ -6715,43 +6715,33 @@ async function li(e = "", t = !0) {
|
|
|
6715
6715
|
"--all",
|
|
6716
6716
|
"--json",
|
|
6717
6717
|
"--omit=dev"
|
|
6718
|
-
], "licenses/licenseTree.json"), await ui("3️⃣"), jr("Dependencies documented.");
|
|
6718
|
+
], "licenses/licenseTree.json"), await ui("3️⃣4️⃣"), jr("Dependencies documented.");
|
|
6719
6719
|
} catch (e) {
|
|
6720
6720
|
console.error("❌ Error documenting dependencies.", e), process.exit(1);
|
|
6721
6721
|
}
|
|
6722
6722
|
}
|
|
6723
6723
|
async function ui(e) {
|
|
6724
6724
|
$(`${e} Insert licenses into 'README.md'`);
|
|
6725
|
-
let t = await Q("licenses/licenses.json"),
|
|
6726
|
-
for (let [e,
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
}
|
|
6730
|
-
await Promise.all(n.values().map(async (e) => {
|
|
6731
|
-
e.latestRemoteModified = await fi(e.name, e.installedVersion);
|
|
6725
|
+
let [t, n] = await Promise.all([Q("licenses/licenses.json"), Q("licenses/licenseTree.json")]), r = /* @__PURE__ */ new Map();
|
|
6726
|
+
for (let [e, n] of Object.entries(t)) r.set(e, di(e, n));
|
|
6727
|
+
await Promise.all(r.values().map(async (e) => {
|
|
6728
|
+
e.publishedDate = await fi(e.name, e.installedVersion);
|
|
6732
6729
|
}));
|
|
6733
|
-
let
|
|
6734
|
-
|
|
6735
|
-
let
|
|
6736
|
-
await kr("README.md",
|
|
6730
|
+
let i = [];
|
|
6731
|
+
n.dependencies != null && pi(n.dependencies, r, i, "");
|
|
6732
|
+
let a = `|Name|License|Version|Published|Document|\n|:-|:-|:-:|:-|:-|\n${i.join("")}`;
|
|
6733
|
+
await kr("README.md", Ir(await Er("./README.md"), a, si, ci));
|
|
6737
6734
|
}
|
|
6738
6735
|
function di(e, t) {
|
|
6739
6736
|
let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
|
|
6740
|
-
return
|
|
6741
|
-
department: "",
|
|
6742
|
-
relatedTo: "",
|
|
6737
|
+
return {
|
|
6743
6738
|
name: r,
|
|
6744
|
-
|
|
6745
|
-
material: "",
|
|
6746
|
-
licenseType: t.licenses,
|
|
6747
|
-
link: t.repository ?? "",
|
|
6748
|
-
remoteVersion: i,
|
|
6739
|
+
licenseTypes: t.licenses,
|
|
6749
6740
|
installedVersion: i,
|
|
6750
|
-
definedVersion: i,
|
|
6751
6741
|
author: t.publisher ?? "",
|
|
6752
|
-
|
|
6742
|
+
publishedDate: "",
|
|
6753
6743
|
...t.licenseFile != null && { licenseFileLink: t.licenseFile }
|
|
6754
|
-
}
|
|
6744
|
+
};
|
|
6755
6745
|
}
|
|
6756
6746
|
async function fi(e, t) {
|
|
6757
6747
|
try {
|
|
@@ -6763,11 +6753,18 @@ async function fi(e, t) {
|
|
|
6763
6753
|
} catch {}
|
|
6764
6754
|
return "";
|
|
6765
6755
|
}
|
|
6766
|
-
function pi(e) {
|
|
6767
|
-
let
|
|
6768
|
-
|
|
6756
|
+
function pi(e, t, n, r) {
|
|
6757
|
+
let i = Object.keys(e).at(-1);
|
|
6758
|
+
for (let [a, o] of Object.entries(e)) {
|
|
6759
|
+
let e = a === i, s = o.version ?? "", c = e ? "└── " : "├── ", l = e ? " " : "│ ";
|
|
6760
|
+
n.push(mi(`${r}${c}${a}`, s, t.get(`${a}@${s}`))), o.dependencies != null && pi(o.dependencies, t, n, `${r}${l}`);
|
|
6761
|
+
}
|
|
6769
6762
|
}
|
|
6770
|
-
function mi(e) {
|
|
6763
|
+
function mi(e, t, n) {
|
|
6764
|
+
let r = n?.licenseTypes ?? "n/a", i = n?.publishedDate ? hi(n.publishedDate.split("T", 1)[0]) : "n/a", a;
|
|
6765
|
+
return a = n?.licenseFileLink == null || n.licenseFileLink === "" ? "⚠️ No license file" : `[${n.licenseFileLink.slice(Math.max(0, n.licenseFileLink.lastIndexOf("/") + 1))}](${n.licenseFileLink})`, `|${e}|${r}|${t}|${i}|${a}|\n`;
|
|
6766
|
+
}
|
|
6767
|
+
function hi(e) {
|
|
6771
6768
|
if (e == null || e === "") return "n/a";
|
|
6772
6769
|
let t = e.split("T", 1)[0];
|
|
6773
6770
|
if (t == null || t === "") return "n/a";
|
|
@@ -6776,7 +6773,7 @@ function mi(e) {
|
|
|
6776
6773
|
}
|
|
6777
6774
|
//#endregion
|
|
6778
6775
|
//#region src/operations/formatCode.ts
|
|
6779
|
-
async function
|
|
6776
|
+
async function gi() {
|
|
6780
6777
|
try {
|
|
6781
6778
|
Ar("Format Code"), await Z("1️⃣ Format", "prettier", [
|
|
6782
6779
|
"--write",
|
|
@@ -6791,7 +6788,7 @@ async function hi() {
|
|
|
6791
6788
|
}
|
|
6792
6789
|
//#endregion
|
|
6793
6790
|
//#region src/operations/lintCode.ts
|
|
6794
|
-
async function
|
|
6791
|
+
async function _i() {
|
|
6795
6792
|
try {
|
|
6796
6793
|
Ar("Lint Code"), await Z("1️⃣ Lint", "eslint", ["."]), jr("Code linted.");
|
|
6797
6794
|
} catch (e) {
|
|
@@ -6800,7 +6797,7 @@ async function gi() {
|
|
|
6800
6797
|
}
|
|
6801
6798
|
//#endregion
|
|
6802
6799
|
//#region src/operations/updateDPUseDependencies.ts
|
|
6803
|
-
var
|
|
6800
|
+
var vi = [
|
|
6804
6801
|
"1️⃣",
|
|
6805
6802
|
"2️⃣",
|
|
6806
6803
|
"3️⃣",
|
|
@@ -6811,23 +6808,23 @@ var _i = [
|
|
|
6811
6808
|
"8️⃣",
|
|
6812
6809
|
"9️⃣"
|
|
6813
6810
|
];
|
|
6814
|
-
async function
|
|
6811
|
+
async function yi(e = []) {
|
|
6815
6812
|
try {
|
|
6816
6813
|
Ar("Update '@dpuse/dpuse' Dependencies");
|
|
6817
6814
|
for (let [t, n] of e.entries()) {
|
|
6818
|
-
let e =
|
|
6819
|
-
n === "eslint" ? await Z(`${e} Update '${n}'`, "npm", ["install", "@dpuse/eslint-config-dpuse@latest"]) : (await Z(`${e} Update '${n}'`, "npm", ["install", `@dpuse/dpuse-${n}@latest`]), n === "development" && await
|
|
6815
|
+
let e = vi.at(t) ?? "🔢";
|
|
6816
|
+
n === "eslint" ? await Z(`${e} Update '${n}'`, "npm", ["install", "@dpuse/eslint-config-dpuse@latest"]) : (await Z(`${e} Update '${n}'`, "npm", ["install", `@dpuse/dpuse-${n}@latest`]), n === "development" && await bi(Mr((await Q("config.json")).id)));
|
|
6820
6817
|
}
|
|
6821
6818
|
jr("'@dpuse/dpuse' dependencies updated.");
|
|
6822
6819
|
} catch (e) {
|
|
6823
6820
|
console.error("❌ Error updating '@dpuse/dpuse' dependencies.", e), process.exit(1);
|
|
6824
6821
|
}
|
|
6825
6822
|
}
|
|
6826
|
-
async function
|
|
6823
|
+
async function bi(e) {
|
|
6827
6824
|
let t = n.dirname(o(import.meta.url));
|
|
6828
|
-
await
|
|
6825
|
+
await xi(t, "../", ".editorconfig"), await xi(t, "../", ".gitattributes"), await xi(t, "../", e.isPublished ? ".gitignore_published" : ".gitignore_unpublished", ".gitignore2"), await xi(t, "../", ".markdownlint.json"), await xi(t, "../", "LICENSE"), await xi(t, "../", "tsconfig.json", "tsconfig2.json"), e.typeId === "eslint" || (await xi(t, "../", "eslint.config.ts", "eslint.config2.ts"), await xi(t, "../", "vite.config.ts", "vite.config2.ts"), await xi(t, "../", "vitest.config.ts", "vitest.config2.ts"));
|
|
6829
6826
|
}
|
|
6830
|
-
async function
|
|
6827
|
+
async function xi(e, t, r, i) {
|
|
6831
6828
|
let a = await Er(n.resolve(e, `${t}${r}`)), o = n.resolve(process.cwd(), r.split("_", 1)[0] ?? r), s = n.resolve(process.cwd(), i ?? r), c;
|
|
6832
6829
|
try {
|
|
6833
6830
|
c = await Er(o);
|
|
@@ -6841,6 +6838,6 @@ async function bi(e, t, r, i) {
|
|
|
6841
6838
|
await kr(s, a), console.info(`ℹ️ File '${i ?? r}' synchronised.`);
|
|
6842
6839
|
}
|
|
6843
6840
|
//#endregion
|
|
6844
|
-
export { ri as auditDependencies, Ur as buildProject, oi as checkDependencies, li as documentDependencies,
|
|
6841
|
+
export { ri as auditDependencies, Ur as buildProject, oi as checkDependencies, li as documentDependencies, gi as formatCode, _i as lintCode, Wr as releaseProject, Zr as syncProjectWithGitHub, Qr as testProject, yi as updateDPUseDependencies, Rr as uploadDirectoryToR2 };
|
|
6845
6842
|
|
|
6846
6843
|
//# sourceMappingURL=dpuse-development.es.js.map
|